//guaiwuleft.js
cc.Class({
    extends: cc.Component,
    properties: {
        times: 0,//控制时间
        },
    
    onLoad: function () {
        this.moveRight();
    },
    //左右移动
    moveRight: function(){
        var seq = cc.repeatForever(
             cc.sequence(
                 cc.moveBy(this.times, cc.p(240, 0)), cc.moveBy(this.times, cc.p(-240,0))
             ));
        this.node.runAction(seq);
    }
});
